home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Enigma Amiga CD / Programmi / Ital20.lha / ital20 / arexx / ItalShellE.rexx < prev    next >
OS/2 REXX Batch file  |  1995-05-24  |  3KB  |  105 lines

  1. /* 
  2. *
  3. *
  4.         #####################################
  5.         #             ItalSHELL             #
  6.         #  AREXX Words Translator for ITAL  #
  7.         #    Written by: Andrea Modenese    #
  8.         #      SysOp of: ToTaLLy WiReD      #
  9.         #   +39-41-5269419  12:00 > 24:00   #
  10.         # Fido: 2:333/714 AmigaNet 39:101/8 #
  11.         #####################################
  12. *
  13. *  Di Andrea Modenese (25.8.94).
  14. *
  15. *  This is a very simple Arexx script to translate a word or a sentence
  16. *  from a Shell, from English to Italian.
  17. *  First of all, you must get rexx.server running, so if you didn't do
  18. *  yet, please execute RexxMast. Also make sure that Ital has opened 
  19. *  its Arexx port. Then open a Shell and type the command 'rx ItalShell';
  20. *  (I suggest you to copy this script in you own 'REXX' directory).
  21. *  If all works properly, you will be able to enter an english word or
  22. *  sentence and get the translation by Ital.
  23. *
  24. *
  25. *  The following modifications were made by Arturo Ortino for Ital 2.0
  26. *  on 15.12.94:
  27. *  
  28. *  (I removed 'NOREQ' for it was superflous in
  29. *  the new version of Ital. Moreover, I substituted
  30. *  'parse pull word$' for 'pull word$' to enter the
  31. *  input line/sentences to be translated.
  32. *
  33. *  NOTE.1: Always adopt a correct punctation when you insert a
  34. *          sentence to be translated. If possible, insert a
  35. *          punctation mark in the end of the sentence; for example,
  36. *          try to insert the following sentences WITH and WITHOUT
  37. *          the ending full stop:
  38. *
  39. *       1) I love you.
  40. *          2) My trouble.
  41. *       
  42. *           
  43. *  NOTE.2: To finish, enter a blank line, that is, hit ENTER.
  44. *
  45. */
  46.  
  47.  
  48. options results
  49.  
  50. /*
  51. *  IMPORTANT : Put _your_ path in the following line to execute ITAL !!
  52. */
  53.  
  54. ITAL = "Work:Inglese/Varie/ITAL"
  55.  
  56. $VER = v.035 (25.8.94)
  57.  
  58.  
  59. if ~show('P','ITAL') then
  60.     DO
  61.         address command ITAL
  62.     address command "waitforport ITAL"
  63.     END
  64.  
  65. address 'ITAL'
  66.  
  67. say '+----------------------------------+'
  68. say ' ItalShell - AREXX Word Translator!'
  69. say '+----------------------------------+'
  70. say '         [RETURN] to exit'
  71. say 
  72.  
  73. TRANSLATE:
  74. options prompt '> Sentence to translate? ';parse pull word$
  75. say ''
  76.  
  77. if word$ = '' then signal OUT
  78.      
  79.            else do
  80.            say 'Wait please: 'word$
  81.            call open out,'T:word.tmp',write
  82.            call writeln out,word$
  83.            call close out
  84.  
  85.  
  86. 'CLEAR'
  87. 't:word.tmp'
  88.  
  89.            say
  90.            say "Here is a translation..."
  91.            say
  92.  
  93.            address command "type t:word.tmp.tra"
  94.            address command 'delete >NIL: t:word.tmp'
  95.            address command 'delete >NIL: t:word.tmp.tra'
  96.  
  97. say
  98. end
  99. signal translate
  100.  
  101. OUT:
  102. 'QUIT'
  103. say 'ItalShell '$Ver '...Byeeeeee!'
  104. exit
  105.